from __future__ import print_function

from kivy.lang import Builder
from kivy.app import App
from kivy.properties import NumericProperty
from kivy.uix.label import Label

from goblinoid.profile.profilemodal import ProfileModal

Builder.load_file('goblinoid/feed/kv/description.kv')


class Description(Label):
    index = NumericProperty()

    def open_actor_profile(self):
        activity = App.get_running_app().pump_service.inbox[self.index]
        profile = activity.actor
        profile_modal = ProfileModal(profile)
        profile_modal.open()
